import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-07-10
 * Time: 22:23
 */
public class Test {
    public static void main(String[] args) {
        int res=0;//1个数
        Scanner in =new Scanner(System.in);
        int x=in.nextInt();
        while(x > 0){
            if((x&1) != 0){
                res++;
            }
            x=x>>>1;
        }
        System.out.print(res);
    }
}
